﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using web.data.entities;
using web.bussines;
using Webdiyer.WebControls.Mvc;
using System.Web.UI;
using web.core.Controllers;

namespace web.core.Models
{
    public class checkoutModels
    {
        public static int createOrder(order ord, List<order_detail> list_order_detail)
        {
            checkout_service chSvc = new checkout_service();
            return chSvc.createOrder(ord, list_order_detail);
        }

        public static customer GetCustomerByUserID(int user_id)
        {
            checkout_service chSvc = new checkout_service();
            return chSvc.GetCustomerByUserID(user_id);
        }

        public static order GetOrderByID(int order_id)
        {
            checkout_service chSvc = new checkout_service();
            return chSvc.GetOrderByID(order_id);
        }

        public static order GetLastOrderPendingByUserID(int user_id)
        {
            checkout_service chSvc = new checkout_service();
            return chSvc.GetLastOrderPendingByUserID(user_id);
        }

        public static void UpdatePaymentMenthodForOrder(order ord)
        {
            checkout_service chSvc = new checkout_service();
            chSvc.UpdatePaymentMenthodForOrder(ord);
        }
    }
}